package com.example.dto;

import java.time.LocalDateTime;
import java.util.List;

import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import lombok.Data;

@Data
public class ExamRequest {
    
    @NotBlank(message = "考试标题不能为空")
    @Size(max = 100, message = "考试标题长度不能超过100个字符")
    private String title;
    
    @Size(max = 500, message = "考试描述长度不能超过500个字符")
    private String description;
    
    @NotNull(message = "开始时间不能为空")
    private LocalDateTime startTime;
    
    @NotNull(message = "结束时间不能为空")
    private LocalDateTime endTime;
    
    @NotNull(message = "考试时长不能为空")
    @Min(value = 5, message = "考试时长不能少于5分钟")
    private Integer duration;
    
    @NotNull(message = "总分不能为空")
    @Min(value = 1, message = "总分不能小于1分")
    private Integer totalScore;
    
    @Min(value = 0, message = "通过分数不能为负数")
    private Integer passScore;
    
    private String status;                // 考试状态
    private String questionSelectionMode; // 组题方式
    private String randomQuestionRules;   // 随机组题规则
    
    private Boolean randomQuestions;      // 是否随机题目顺序
    private Boolean preventCheating;      // 是否启用防作弊
    private Boolean showResults;          // 是否显示结果
    
    private List<Long> classIds;          // 班级ID列表
    private List<Long> questionIds;       // 手动选择的题目ID列表
    
    // 随机组题相关参数
    private String randomPoolCategory;    // 随机题库分类
    private String difficultyRange;       // 难度范围
    private String knowledgePoints;       // 知识点要求
    private Integer questionCount;        // 随机抽题数量
} 